package com.lmaye.lr.service.user.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author lmay.Zhou
 * @since 2020-04-02
 */
@TableName("tb_user")
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;

        /**
     * 主键
     */
         private Integer id;

        /**
     * 用户名
     */
         private String name;

        /**
     * 邮箱
     */
         private String email;

        /**
     * 手机号
     */
         private String mobile;

        /**
     * 性别: 0.保密; 1.男; 2.女;
     */
         private Boolean sex;

        /**
     * 头像
     */
         private String avatar;

        /**
     * 拓展字段
     */
         private String ext;

        /**
     * 版本号
     */
         private Integer version;

        /**
     * 创建时间
     */
         @TableField("create_at")
    private LocalDateTime createAt;

        /**
     * 最后修改时间
     */
         @TableField("last_modified_at")
    private LocalDateTime lastModifiedAt;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Boolean getSex() {
        return sex;
    }

    public void setSex(Boolean sex) {
        this.sex = sex;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getExt() {
        return ext;
    }

    public void setExt(String ext) {
        this.ext = ext;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public LocalDateTime getCreateAt() {
        return createAt;
    }

    public void setCreateAt(LocalDateTime createAt) {
        this.createAt = createAt;
    }

    public LocalDateTime getLastModifiedAt() {
        return lastModifiedAt;
    }

    public void setLastModifiedAt(LocalDateTime lastModifiedAt) {
        this.lastModifiedAt = lastModifiedAt;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "TbUser{" +
        "id=" + id +
        ", name=" + name +
        ", email=" + email +
        ", mobile=" + mobile +
        ", sex=" + sex +
        ", avatar=" + avatar +
        ", ext=" + ext +
        ", version=" + version +
        ", createAt=" + createAt +
        ", lastModifiedAt=" + lastModifiedAt +
        "}";
    }
}
